package com.model;

import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Page;

public class User extends Model<User> {
	
	public Page<User> paginate(int pageNumber, int pageSize) {
		return paginate(pageNumber, pageSize, "select *", "from t_user order by Id asc");
	}

	public User login(String username) {
		return new User().findFirst("select * from t_user where UserName = " + username);
	}
}
